package org.atlantis.evnlib.listener;

import org.atlantis.evnlib.EventArg;
import org.atlantis.evnlib.Log;
import org.atlantis.evnlib.OnEvent;

public class ExceptionListenern {

	private long startTime = System.currentTimeMillis();

	@OnEvent("exceptionEvent")
	public void throwException(EventArg arg) {
		long nowTime = System.currentTimeMillis();
		if (nowTime - startTime < 5000L) throw new RuntimeException("A Error occured.");
		Log.debug("This is a ExceptionListener.");
	}
}
